package com.delong.spring.handler;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;

import com.delong.model.user.User;
/**
 * controller super class
 * @author liyang
 *
 */
public class BaseController {
	@Autowired
	private HttpServletRequest context;
	public User user;

	public User getUser() {
		String username = (String) context.getSession().getAttribute("username");
		user = new User();
		user.setUsername(username);
		return this.user;
	}
}
